CREATE EXTERNAL TABLE jms_ods.yl_lmdm_sys_tail_code_town
   (  ID bigint    COMMENT 'ID',    --NUMBER(11,0)
    TAIL_CODE  string comment '第三段码编码（关联字段）'  ,     -- NVARCHAR2(20)
  TAIL_ID  bigint COMMENT '第三段码主键（关联字段）',       --NUMBER(11,0)
  TOWN_ID     bigint COMMENT '乡镇id'  ,   --NUMBER(11,0)
  TOWN_NAME  string  COMMENT '乡镇名称'   --NVARCHAR2(30)

   ) COMMENT '第三段码-乡镇关联表'
 PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
 STORED AS PARQUET
 LOCATION '/dw/hive/jms_ods.db/external/yl_lmdm_sys_tail_code_town'
 TBLPROPERTIES (
 'discover.partitions'='false',
 'parquet.column.index.access'='true'
 );
MSCK REPAIR TABLE jms_ods.yl_lmdm_sys_tail_code_town;